package org.datastreamapi.read

import org.FlinkStreamApp
import org.apache.flink.streaming.api.scala._
import org.bean.SensorReading

/**
 * description ：从批中读取数据
 * author      ：剧情再美终是戏 
 * mail        : 13286520398@163.com
 * date        ：Created in 2020/2/21 14:02
 * modified By ：
 * version:    : 1.0
 */
object BathRead extends FlinkStreamApp {

  override def doSomeThing(environment: StreamExecutionEnvironment) = {
    val source = environment.fromCollection(List(
      SensorReading("sensor_1", 1547718199, 35.80018327300259),
      SensorReading("sensor_6", 1547718199, 15.402984393403084),
      SensorReading("sensor_7", 1547718199, 6.720945201171228),
      SensorReading("sensor_10", 1547718199, 38.101067604893444)
    ))

    source.print()
  }
}
